package com.example.messagerox;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.telephony.gsm.SmsManager;

public class Sms {
	
	public void enviarSms(Context context, String destino, String mensagem){
		
		try {
			SmsManager smsManager = SmsManager.getDefault();
			PendingIntent pIntent = PendingIntent.getBroadcast(context,0, new Intent(), 0);
			smsManager.sendTextMessage(destino, null, mensagem, pIntent, null);
		} catch (Exception e) {
			// TODO: handle exception
		}
	}

}
